import GameLogic as gl

Defualts = {
	'Init':True,
	'Kart':None,
	'UseMouseTurn':False
	}
	
def LoadDefaults():
	for option in Defualts:
		gl.globalDict[option] = Defualts[option]

	
def ChangeOption(key, value):
	# Could do value checking here
	gl.globalDict[key] = value
	
def ToogleOption(key):
	gl.globalDict[key] = False if gl.globalDict[key] else True
	
def GetValue(key):
	return gl.globalDict[key]
	
# Use actuators for these for now	
def SaveOptions(cont):	
	cont.activate('save')
	# gl.saveGlobalDict()
	
	print(gl.expandPath('//'))
	
def LoadOptions(cont):	
	cont.activate('load')
	# gl.loadGlobalDict()
	if not gl.globalDict:
		LoadDefaults()
	
	# Reset the kart option
	gl.globalDict['Kart'] = None